<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%
    String path = request.getContextPath();
    request.setAttribute("path",path);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link type="text/css" rel="stylesheet" href="${path}/jbs/css/style.css" />
    <script src="js/iepng.js" type="text/javascript"></script>
        <script type="text/javascript">
           EvPNG.fix('div, ul, img, li, input, a'); 
        </script>
    <script type="text/javascript" src="${path}/jbs/js/jquery-1.11.1.min_044d0927.js"></script>
	<script type="text/javascript" src="${path}/jbs/js/jquery.bxslider_e88acd1b.js"></script>
    
    <script type="text/javascript" src="${path}/jbs/js/jquery-1.8.2.min.js"></script>
    <script type="text/javascript" src="${path}/jbs/js/menu.js"></script>
        
	<script type="text/javascript" src="${path}/jbs/js/select.js"></script>
    
	<script type="text/javascript" src="${path}/jbs/js/lrscroll.js"></script>
    
    <script type="text/javascript" src="${path}/jbs/js/iban.js"></script>
    <script type="text/javascript" src="${path}/jbs/js/fban.js"></script>
    <script type="text/javascript" src="${path}/jbs/js/f_ban.js"></script>
    <script type="text/javascript" src="${path}/jbs/js/mban.js"></script>
    <script type="text/javascript" src="${path}/jbs/js/bban.js"></script>
    <script type="text/javascript" src="${path}/jbs/js/hban.js"></script>
    <script type="text/javascript" src="${path}/jbs/js/tban.js"></script>
    
	<script type="text/javascript" src="${path}/jbs/js/lrscroll_1.js"></script>

    <link rel="icon" href="<%=path%>/jbs/images/ico.ico" type="image/x-icon">
<title>登录-青鸟优选</title>
</head>
<body>
<div class="log_bg">	
    <div class="top">
        <div class="logo"><a href="Index.jsp"><img src="${path}/jbs/images/logo.png"/></a></div>
    </div>
	<div class="login">
    	<div class="log_img"><img src="${path}/jbs/images/l_img.png" width="611" height="425" /></div>
		<div class="log_c">
        	<form action="${path}/userServlet" method="post" id="myForm">
            <table border="0" style="width:370px; font-size:14px; margin-top:30px;" cellspacing="0" cellpadding="0" class="op_Table">
              <tr height="50" valign="top">
              	<td width="55">&nbsp;</td>
                <td>
                	<span class="fl" style="font-size:24px;">登录</span>
                    <span class="fr">还没有商城账号，<a href="${path}/jbs/Regist.jsp" style="color: #02A4d9;">立即注册</a></span>
                </td>
              </tr>
              <tr height="70">
                <td>手机号</td>
                <td><input type="text" value="${userCookieName}" class="l_user" name="name" id="userName" placeholder ="请输入手机号"/><span class="ErrorInfo" id="sNumber"></span></td>
              </tr>
                <tr>
                </tr>
              <tr height="70">
                <td>密&nbsp; &nbsp; 码</td>
                <td><input type="password" value="${userCookiePwd}" class="l_pwd" name="pwd" id="userPass" placeholder ="请输入密码"/><span id="sPwd" class="ErrorInfo"></span></td>
              </tr>
              <tr>
              	<td>&nbsp;</td>
                <td style="font-size:12px; padding-top:20px;">
                    <p style="color: red">${msg}</p>
                	<span style="font-family:'宋体',serif;" class="fl">
                    	<label class="r_rad"><input type="checkbox" name="checkTheme"/></label><label class="r_txt">请保存我这次的登录信息</label>
                    </span>
                    <input type="hidden" value="${userSession}"/>
                </td>
              </tr>
              <tr height="60">
              	<td>&nbsp;</td>
                <td><input type="button" value="登录" class="log_btn" onclick="check()"/></td>
              </tr>
            </table>
            </form>
        </div>
    </div>
</div>
<div class="btmbg">
    <div class="btm">
        <a href="https://beian.miit.gov.cn">备案/许可证编号：鄂ICP备20008779号-1</a> <br />本站仅供个人学习实践，无实际购买功能
    </div>
</div>
</body>

<script src="${path}/jbs/js/zh_CN.js"></script>

<script>
    // 验证用户名
    function checkUserName() {
        let userName = $("#userName").val();
        if (userName.length === 11) {
            return true;
        }else {
            return false;
        }
    }

    //验证密码
    function checkUserPass() {
        let userPass = $("#userPass").val();
        if (userPass.length >= 6 && userPass.length <= 16) {
            return true;
        }else {
            return false;
        }
    }

    // 提交
    function check() {
        if (!checkUserName()) {
            document.getElementById("sNumber").innerHTML="手机号不符合规则";
            return false;
        }
        if (!checkUserPass()) {
            document.getElementById("sPwd").innerHTML="密码不符合规则";
            return false;
        }

        // 提交表单
        let myForm = $("#myForm");
        myForm.submit();
    }

</script>
</html>
